Skip to content

Comments

Update tags_controller to use scopings on sectors and categories#1080

Merged
maebeale merged 1 commit intomainfrom
1066_show_sectors_and_categories_with_taggings
Feb 21, 2026
Merged

Update tags_controller to use scopings on sectors and categories#1080
maebeale merged 1 commit intomainfrom
1066_show_sectors_and_categories_with_taggings

Conversation

@RJV333
Copy link
Collaborator

@RJV333 RJV333 commented Feb 18, 2026

What is the goal of this PR and why is this important?

The /tags endpoint should only feature button_links to tags that are being used (with at least one taggable) for the Sectors and Categories windows

tags

@RJV333 RJV333 self-assigned this Feb 18, 2026
def sectors
authorize! Sector, to: :tags_index?
@sectors = Sector.published.order(:name)
@sectors = Sector.published.has_taggings.order(:name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RJV333 this PR should include this scope being added to Sector, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that scope already exists actually. We just weren't using it.

@maebeale maebeale merged commit f93264f into main Feb 21, 2026
3 checks passed
@maebeale maebeale deleted the 1066_show_sectors_and_categories_with_taggings branch February 21, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants